Blog

Curt Gratz

June 29, 2010

Spread the word


Share your thoughts

One of my favorite new features of Coldbox 3.0 is the ability to have a CFC only config file. Thats right, no more XML. No don't get me wrong, XML has its place, but I love the ability to get funky with my config file. With it now being a CFC, I can do some crazy cool stuff.

For example

  1. I can now have my config files all extend a base config file or any other CFC, now thats cool.
  2. I can get creative with defining my enviromental variables, or create any other kind of helper functions.
  3. I can easily set a variable anywhere in the config file and EASILY refer to it.

These are just a few of the ways that I have already taken advantage of the Config.cfc.

What are some ways you have? Feel free to comment with any crazy or funky ideas you've used or plan to use with a fully ColdFusion-ifide (its a word, look it up) config file, I'd love to hear them.

Add Your Comment

(4)

Jun 29, 2010 22:41:08 UTC

by John Farrar

OK... now this makes me curious if it will be easy for me to use COOP and/or CFish with ColdBox now. :)

Jun 29, 2010 22:55:58 UTC

by Doug Boude

I personally was so intrigued with this feature in Coldbox that I dissected it to find out exactly "how" it works and learned a LOT about implementing the decorator pattern in CF in general! I haven't used the config CFC to do anything uber funky, but the freedom it allows to be able to utilize CF functionality directly within one's configuration is priceless! For instance, populating a variable that contains a calculated date, like "X days till Christmas".

Jun 30, 2010 08:46:23 UTC

by Curt Gratz

Doug, I remember reading some posts you did about creating a CFC Config file. They were some good stuff. Oh, and setting configuration settings that change on certain dates, now that is a cool idea. Maybe change up all your Layouts around holidays to be a holiday theme automatically. I could use that.

Jun 30, 2010 10:42:37 UTC

by Luis Majano

WOW! That is really funky, I like that! Get your xmas themes up and ready now! I also use it to instantiate external API's or factories or whatever, then just place them on the cache directly or in the settings structure. You have full control now and I love that!

Recent Entries

Into the Box is Going Online, Register Now!

Into the Box is Going Online, Register Now!

Dive into the Future of Web Development with Into the Box 2024 - now going global and online! No matter where you are, you're invited to join us for an amazing and enriching two-day experience on May 16th and 17th, packed with groundbreaking insights, expert sessions, and game-changing announcements.

Maria Jose Herrera
Maria Jose Herrera
May 01, 2024
Into the Box 2024: Your Gateway to the Future of Tech!

Into the Box 2024: Your Gateway to the Future of Tech!

Are you ready to advance your coding skills? The future of Modern Web Development awaits at Into the Box 2024, and we're thrilled to announce that due to high demand, we're extending our Early Bird pricing for an additional week!

Maria Jose Herrera
Maria Jose Herrera
April 26, 2024